package org.ymjava.medical.db.AllPackage.biz;

import org.springframework.stereotype.Service;
import org.ymjava.medical.db.AbstractBaseBiz.BaseBiz;
import org.ymjava.medical.db.AllPackage.entity.SysRolePerm;
import org.ymjava.medical.db.AllPackage.mapper.SysRolePermMapper;
import tk.mybatis.mapper.entity.Example;

import javax.annotation.Resource;

/**
 * 角色权限关联表
 *
 * @author zhy
 * @email ${email}
 * @date 2020-04-03 15:53:44
 */
@Service
public class SysRolePermBiz extends BaseBiz<SysRolePermMapper,SysRolePerm> {

	@Resource
	private SysRolePermMapper sysRolePermMapper;

	public void deleteByidPtype(Integer roleId,Integer ptype){
		Example example = new Example(SysRolePerm.class);
		example.createCriteria().andEqualTo("role_id",roleId).andEqualTo("perm_type",ptype);
		sysRolePermMapper.deleteByExample(example);
	}
}